using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._WorkflowManagerTools._Configuration
{
    /// <summary>
    /// <para>Synchronize Job Data</para>
    /// <para>Synchronizes multiple Workflow Manager (Classic) repositories participating in a Workflow Manager (Classic) cluster. The tool performs two-way synchronization; changes from the child repositories are sent to the parent repository and changes from the parent are sent to all child repositories.</para>
    /// <para>同步参与 Workflow Manager （Classic） 集群的多个 Workflow Manager （Classic） 资料档案库。该工具执行双向同步;子存储库中的更改将发送到父存储库，父存储库中的更改将发送到所有子存储库。</para>
    /// </summary>    
    [DisplayName("Synchronize Job Data")]
    public class SynchronizeJobData : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SynchronizeJobData()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Parent_Repository_URL">
        /// <para>Parent Repository URL</para>
        /// <para>The URL for the parent repository will be the Workflow Manager (Classic) server URL, for example, http://localhost/arcgis/rest/services/parent/wmserver.</para>
        /// <para>父资料档案档案库的 URL 将是 Workflow Manager （Classic） 服务器 URL，例如 http://localhost/arcgis/rest/services/parent/wmserver。</para>
        /// </param>
        /// <param name="_Input_Parent_Repository_Name">
        /// <para>Parent Repository Name</para>
        /// <para>The parent repository that will distribute the Workflow Manager (Classic) jobs and configuration elements.</para>
        /// <para>将分发 Workflow Manager （Classic） 作业和配置元素的父资料档案库。</para>
        /// </param>
        /// <param name="_Input_Multi_Name">
        /// <para>Child Repository Names and URLs</para>
        /// <para><xdoc>
        ///   <para>The child repositories that will be updated with the parent repository configuration. To add a child repository, provide the repository name and click the Add button. After adding the child, enter values for Connected, URL, and Last Sync Time as follows:
        ///   <bulletList>
        ///     <bullet_item>Connected—The only accepted value is true. If any other value is provided, the child will not be synchronized.  </bullet_item><para/>
        ///     <bullet_item>URL—The URL of the child repository.  </bullet_item><para/>
        ///     <bullet_item>Last Sync Time—The date and time in the system format. For example, if your system data and time format is MM:DD:YY HH:MM:SS, the value will be 08/01/2013 11:30:45.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>将使用父存储库配置更新的子存储库。要添加子存储库，请提供存储库名称，然后单击“添加”按钮。添加子项后，输入“已连接”、“URL”和“上次同步时间”的值，如下所示：
        ///   <bulletList>
        ///     <bullet_item>已连接 - 唯一接受的值为 true。如果提供了任何其他值，则不会同步子项。 </bullet_item><para/>
        ///     <bullet_item>URL - 子存储库的 URL。</bullet_item><para/>
        ///     <bullet_item>上次同步时间 - 系统格式的日期和时间。例如，如果系统数据和时间格式为 MM：DD：YY HH：MM：SS，则值将为 08/01/2013 11：30：45。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        public SynchronizeJobData(object _Input_Parent_Repository_URL, object _Input_Parent_Repository_Name, object _Input_Multi_Name)
        {
            this._Input_Parent_Repository_URL = _Input_Parent_Repository_URL;
            this._Input_Parent_Repository_Name = _Input_Parent_Repository_Name;
            this._Input_Multi_Name = _Input_Multi_Name;
        }
        public override string ToolboxName => "Workflow Manager Tools";

        public override string ToolName => "Synchronize Job Data";

        public override string CallName => "wmx.SynchronizeJobData";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_Input_Parent_Repository_URL, _Input_Parent_Repository_Name, _Input_Multi_Name, _Output_SynchronizeReplicaStatus, _Output_LastSync];

        /// <summary>
        /// <para>Parent Repository URL</para>
        /// <para>The URL for the parent repository will be the Workflow Manager (Classic) server URL, for example, http://localhost/arcgis/rest/services/parent/wmserver.</para>
        /// <para>父资料档案档案库的 URL 将是 Workflow Manager （Classic） 服务器 URL，例如 http://localhost/arcgis/rest/services/parent/wmserver。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Parent Repository URL")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Parent_Repository_URL { get; set; }


        /// <summary>
        /// <para>Parent Repository Name</para>
        /// <para>The parent repository that will distribute the Workflow Manager (Classic) jobs and configuration elements.</para>
        /// <para>将分发 Workflow Manager （Classic） 作业和配置元素的父资料档案库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Parent Repository Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Parent_Repository_Name { get; set; }


        /// <summary>
        /// <para>Child Repository Names and URLs</para>
        /// <para><xdoc>
        ///   <para>The child repositories that will be updated with the parent repository configuration. To add a child repository, provide the repository name and click the Add button. After adding the child, enter values for Connected, URL, and Last Sync Time as follows:
        ///   <bulletList>
        ///     <bullet_item>Connected—The only accepted value is true. If any other value is provided, the child will not be synchronized.  </bullet_item><para/>
        ///     <bullet_item>URL—The URL of the child repository.  </bullet_item><para/>
        ///     <bullet_item>Last Sync Time—The date and time in the system format. For example, if your system data and time format is MM:DD:YY HH:MM:SS, the value will be 08/01/2013 11:30:45.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>将使用父存储库配置更新的子存储库。要添加子存储库，请提供存储库名称，然后单击“添加”按钮。添加子项后，输入“已连接”、“URL”和“上次同步时间”的值，如下所示：
        ///   <bulletList>
        ///     <bullet_item>已连接 - 唯一接受的值为 true。如果提供了任何其他值，则不会同步子项。 </bullet_item><para/>
        ///     <bullet_item>URL - 子存储库的 URL。</bullet_item><para/>
        ///     <bullet_item>上次同步时间 - 系统格式的日期和时间。例如，如果系统数据和时间格式为 MM：DD：YY HH：MM：SS，则值将为 08/01/2013 11：30：45。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Child Repository Names and URLs")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Multi_Name { get; set; }


        /// <summary>
        /// <para>Status of Replica Synchronization</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Status of Replica Synchronization")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long? _Output_SynchronizeReplicaStatus { get; set; }


        /// <summary>
        /// <para>Last Synchronized</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Last Synchronized")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Output_LastSync { get; set; }


        public SynchronizeJobData SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}